package cn.pzx.main_module.ui.vm

import androidx.lifecycle.MutableLiveData
import cn.pzx.base_module.base.BaseViewModel
import cn.pzx.base_module.data.ListProjectBean
import cn.pzx.base_module.http.RetrofitClient

/**
 * @author pzx
 * @description:
 * @date :3/10/21 10:54 AM
 */
class MainFragmentVM : BaseViewModel() {
    var articleList = MutableLiveData<ListProjectBean?>()
    var imageUrls = listOf(
        "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1504437738,977218122&fm=26&gp=0.jpg",
        "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3162727223,3948089767&fm=26&gp=0.jpg",
        "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1486271666,307393547&fm=26&gp=0.jpg",
        "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1907109518,605497809&fm=26&gp=0.jpg",
        "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2444510217,1891089714&fm=26&gp=0.jpg",
        "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2570023260,283529150&fm=26&gp=0.jpg"
    )


    fun getAriticleList(page: Int) {


        launch({ RetrofitClient.getInstance().create().getListProject() },articleList,true,true)


    }


}